package main

import (
	"gitee.com/dark.H/gs"
	"gitee.com/dark.H/gt"
)

func main() {

	meue := gt.NewPanelMenu()
	meue.AddItem("One check", func() gs.List[gs.Str] {
		return gs.List[gs.Str]{
			"Hello",
			"World",
			"Test3",
		}
	})
	meue.AddItem("check 2", func() gs.List[gs.Str] {
		return gs.List[gs.Str]{
			"2 Hello",
			"2 World",
			"To Click",
		}
	})

	meue.AddItem("check 333", func() gs.List[gs.Str] {
		return gs.List[gs.Str]{
			"3 Hello",
			"Login",
			"3Test3",
		}
	})
	meue.AddItem("4check 333", func() gs.List[gs.Str] {
		return gs.List[gs.Str]{
			"3 Hello",
			"3 World",
			"3Test3",
		}
	})
	meue.AddItem("554check 333", func() gs.List[gs.Str] {
		return gs.List[gs.Str]{
			"3 Hello",
			"3 World",
			"3Test3",
		}
	})

	meue.OnItemToggle("Login", func() {
		user := gt.TypedInput("User name:")
		passwd := gt.TypedInput("Password :")
		// gt.ShowLabel("user :" + user + " passwd:" + passwd)
		meue.Label("user :" + user + " passwd:" + passwd)

	})
	meue.Focus()

}
